//----------------------------------------------------------------------------
// M A R I T I M E  R E S E A R C H  I N S T I T U T E  N E T H E R L A N D S
//----------------------------------------------------------------------------
// Copyright (C) 2008 - MARIN - All rights reserved - http://www.marin.nl
//----------------------------------------------------------------------------
// Program    : mermaid
// Module     : vbm
// File       : LowPassFilter.h
//----------------------------------------------------------------------------

#ifndef LOWPASSFILTER_H
#define LOWPASSFILTER_H

#include "defines.h"
#include "Array2D.h"

/// Low-pass filter of effective width 1 + 2 * halfwidth
/** (c) 2006 Albatros Flow Research, Zwolle, The Netherlands, Programmed by: Gert Klopman */
class LowPassFilter
{
public:

    LowPassFilter(int Nx1,
                  int Nx2,
                  int half_width,
                  const Array2D<SHORT> &wet);

    virtual ~LowPassFilter();

    void filter(Array2D<REAL> &w);

private:

    /// @cond nevercall
    // should not be called!
    LowPassFilter(const LowPassFilter& m);
    LowPassFilter & operator=(const LowPassFilter& m);
    /// @endcond

    int m_Nx1;
    int m_Nx2;
    int m_halfwidth;
    const Array2D<SHORT> &m_wet;
    Array2D<REAL> m_wtemp;
};

#endif // LOWPASSFILTER_H
